//
//  ErrorCode.swift
//  ECApp
//
//  Created by 程平 on 2017/10/22.
//

import Foundation

enum ResultCode:Int {
    case success = 0
    
    case notFound = 1001
    case parmeterError
    case methodUnavailable
    case unauthorized
    case inValidateToken
    
    case userNameOrPwdError = 2001
    
    var description:String {
        switch self {
        case .success:
            return ""
        case .notFound:
            return "未找到服务"
        case .parmeterError:
            return "参数缺失或者参数类型错误"
        case .methodUnavailable:
            return "请求的method方式不可用"
        case .inValidateToken:
            return "令牌过期了"
        case .unauthorized:
            return "未授权"
        case .userNameOrPwdError:
            return "用户名或者密码错误"
        default:
            return ""
        }
    }
}
